<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <div id="box">
    {{text}}
    {{checked}}
    <input type="checkbox" name="" id="" v-model="checked">全选 <button @click="btn">反选</button>
    <ul>
      <li><input type="checkbox" :checked="checked" name="" id="">猪八戒</li>
      <li><input type="checkbox" :checked="checked" name="" id="">唐僧</li>
      <li><input type="checkbox" :checked="checked" name="" id="">孙悟空</li>
      <li><input type="checkbox" :checked="checked" name="" id="">白龙马</li>
    </ul>
  </div>

  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.14/vue.js"></script>

  <script>


    new Vue({
      el: '#box',
      data: {
        text: 'hello Vue',
        checked: '',


      },
      methods: {
        btn() {
          this.checked = false
        }
      }
    })




  </script>

</body>

</html>